package IO;

import java.io.*;

/**
 * @author wuhan
 * @date 2019/10/10 11:33
 */
public class CopyMp3 {
    public static void main(String[] args) throws IOException {
        long l = System.currentTimeMillis();
        MyBufferedInputStream myBufferedInputStream=new MyBufferedInputStream(new FileInputStream("test.flac"));
        BufferedOutputStream bufferedOutputStream=new BufferedOutputStream(new FileOutputStream("out.flac"));
        int by=0;
        while ((by=myBufferedInputStream.myRead())!=-1){
            bufferedOutputStream.write(by);
        }
        long l1 = System.currentTimeMillis();
        long l2 = l1 - l;
        System.out.println(l2);
        myBufferedInputStream.myClose();
        bufferedOutputStream.close();
    }


}
